package dropbox.common;
/**
 * this class represent a create file command
 * means a file was created on server
 * 
 * @author Yoav
 *
 */
public class CreateFileCommand extends Command {
	//file's checkSum
	private String checkSum;
	//file path
	private String filePath;
	
	/**
	 * d.cont
	 */
	public CreateFileCommand() {
		super();
	}
	
	/**
	 * constructor
	 * @param checkSum file's checkSum
	 * @param filePath file's path
	 */
	public CreateFileCommand(String checkSum, String filePath) {
		super();
		this.checkSum = checkSum;
		this.filePath = filePath;
	}



	/**
	 * get checkSum
	 * @return checkSum
	 */
	public String getCheckSum() {
		return checkSum;
	}


	/**
	 * set checkSum
	 * @param checkSum file's checkSum
	 */
	public void setCheckSum(String checkSum) {
		this.checkSum = checkSum;
	}


	/**
	 * get file path
	 * @return file path
	 */
	public String getFilePath() {
		return filePath;
	}


	/**
	 * set file path
	 * @param filePath file path
	 */
	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}


	/**
	 * use FileAction interface to create a file
	 */
	@Override
	public void execute() {		
		getAction().createFile(checkSum, filePath);
	}

}
